package com.noassertions.domain;

import java.io.Serializable;
import java.sql.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;

//TODO: implement serializable
@Entity
public class Rider implements Serializable
{
	@Id
    @GeneratedValue
	private int riderid; 
	private String firstname; 
	private String lastname; 
	private Date birthdate; 
	private String emailaddress;
	@Column(nullable=true)
	private float totalbodyheight; 
	@Column(nullable=true)
	private float sternalnotch; 
	@Column(nullable=true)
	private float trunk; 
	@Column(nullable=true)
	private float humerus; 
	@Column(nullable=true)
	private float forearm; 
	@Column(nullable=true)
	private float totalarm; 
	@Column(nullable=true)
	private float femur; 
	@Column(nullable=true)
	private float tibia; 
	@Column(nullable=true)
	private float inseam; 
	@Column(nullable=true)
	private float footlength;
	private String notes; 
	@OneToMany(cascade = CascadeType.ALL)//, fetch=FetchType.EAGER)
	@JoinColumn(name = "riderid")
	private Set<Fit> fits = new HashSet();
	
	public int getRiderid() {
		return riderid;
	}
	public void setRiderid(int riderid) {
		this.riderid = riderid;
	}
	public String getFirstname() {
		return firstname;
	}
	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}
	public String getLastname() {
		return lastname;
	}
	public void setLastname(String lastname) {
		this.lastname = lastname;
	}
	public Date getBirthdate() {
		return birthdate;
	}
	public void setBirthdate(Date birthdate) {
		this.birthdate = birthdate;
	}
	public String getEmailaddress() {
		return emailaddress;
	}
	public void setEmailaddress(String emailaddress) {
		this.emailaddress = emailaddress;
	}
	public float getTotalbodyheight() {
		return totalbodyheight;
	}
	public void setTotalbodyheight(float totalbodyheight) {
		this.totalbodyheight = totalbodyheight;
	}
	public float getSternalnotch() {
		return sternalnotch;
	}
	public void setSternalnotch(float sternalnotch) {
		this.sternalnotch = sternalnotch;
	}
	public float getTrunk() {
		return trunk;
	}
	public void setTrunk(float trunk) {
		this.trunk = trunk;
	}
	public float getHumerus() {
		return humerus;
	}
	public void setHumerus(float humerus) {
		this.humerus = humerus;
	}
	public float getForearm() {
		return forearm;
	}
	public void setForearm(float forearm) {
		this.forearm = forearm;
	}
	public float getTotalarm() {
		return totalarm;
	}
	public void setTotalarm(float totalarm) {
		this.totalarm = totalarm;
	}
	public float getFemur() {
		return femur;
	}
	public void setFemur(float femur) {
		this.femur = femur;
	}
	public float getTibia() {
		return tibia;
	}
	public void setTibia(float tibia) {
		this.tibia = tibia;
	}
	public float getInseam() {
		return inseam;
	}
	public void setInseam(float inseam) {
		this.inseam = inseam;
	}
	public float getFootlength() {
		return footlength;
	}
	public void setFootlength(float footlength) {
		this.footlength = footlength;
	}
	public Set<Fit> getFits() {
		return fits;
	}
	public void setFits(Set<Fit> fits) {
		this.fits = fits;
	}
	public void setNotes(String notes) {
		this.notes = notes;
	}
	public String getNotes() {
		return notes;
	}
}